package elijah.base.activity;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.viewbinding.ViewBinding;

import elijah.base.utils.ClassUtils;


public abstract class BaseFragment<V extends ViewBinding> extends Fragment {
    protected V binding;


    protected abstract void init();


    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        binding = (V) ClassUtils.getViewBinding(getClass(), 0, getContext());
        init();
        return binding.getRoot();
    }



}
